home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
rkpls301.zip
/
RKPDEMO3.ZIP
/
BRAND.PAS
next >
Wrap
Pascal/Delphi Source File
|
1993-03-04
|
2KB
|
76 lines
Program Brand;
{
This is a sample program using RkPlus. It is a sample of a software
branding programme that would be used by the user to enter their name
and registration key and modify the EXE file. This sample will brand
the Sample4 programme, using a registration key which would be generated
by the programmer using the GenKey program.
Brand uses the Rkp3Enc unit to cause RkPlus to use the new version 3.x
keys.
}
Uses
Crt,
RkPlus,
Rkp3Enc;
Const
MonthNames : Array[1..12] of String[3]
= ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
Var
kc : Char;
Owner : Array[0..16] of Char;
Prog : Array[0..5] of Char;
Ver : Real;
Begin
Owner := 'ArgleBarbWotsLeeb';
Prog := 'Sample';
Ver := 1.0;
SetOwnerCode(Owner,SizeOf(Owner));
SetProgCode(Prog,SizeOf(Prog));
SetVerCode(Ver,SizeOf(Ver));
SetKeyFile('Sample4');
WriteLn('Brand');
WriteLn('Software Branding Programme for Sample4');
WriteLn('See RKPLUS.DOC for more info');
WriteLn;
Write('Enter name of person to register : ');
ReadLn(Rkp.Name1);
WriteLn;
Write('Enter the registration key : ');
ReadLn(Rkp.Key);
WriteLn;
Rkp.ID := '(c) Serious Cybernetics';
Rkp.Message := 'Brand';
Rkp.Name2 := '';
Rkp.Name3 := '';
Rkp.Level := 0;
VerifyKey;
If Not Rkp.Registered then Begin
Rkp.Level := 1;
VerifyKey;
End;
If Not Rkp.Registered then
WriteLn('Invalid key!')
Else Begin
Write('Branding ',ExeFileName,'...');
BrandRegInfo;
WriteLn;
WriteLn;
If RkpOK then
WriteLn(ExeFileName,' branded.')
Else If (RkpError = InvalidFile) then
WriteLn(ExeFileName,' is not a valid RkPlus file!')
Else
WriteLn('Error ',RkpError,' branding ',ExeFileName,'.');
End;
End.